﻿@using Webdiyer.WebControls.Mvc
@using HiLand.General.Entity
@using HiLand.Utility4.MVC
@using GBFinance.Entity
@using GBFinance.Web.Models
@using HiLand.General
@using HiLand.Utility4.MVC.Data
@model List<BasicSettingEntity>
@{
    ViewBag.Title = "Basic Setting";

}
<h2>
    Basic Setting
</h2>
<div id="ItemListDIV">
    <table width="98%" class="grid">
        <tr>
            <th style="width: 150px">
                Operate
            </th>
            <th style="width: 30px">
                Setting Name
            </th>
            <th style="width: 80px">
                 Setting Value
            </th>
 
            <th>
               Setting Status
            </th>
        </tr>
        @foreach (BasicSettingEntity entity in Model)
        {
            <tr>
                <td>
                    <a href="#"  class="modalInput edit" rel="#EditDIV" itemKey="@entity.SettingID" >Edit</a>
                </td>
                <td>@entity.DisplayName
                </td>
                <td>@entity.SettingValue
                </td>
                <td>@entity.CanUsable.ToString()
                </td>
            </tr>   
        }
    </table>
    <div class="modal modalFix" id="EditDIV">
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#aSettingSection").addClass("current");
            $("#aSystemSetting").addClass("current");

            $(".modalInput").overlay({
                mask: {
                    color: '#ebecff',
                    loadSpeed: 200,
                    opacity: 0.9
                },
                closeOnClick: false
            });

            $("a.edit").click(function () {
                var itemKey = $(this).attr("itemKey");
                var url = '@Url.Action("BasicSetting")' + '?settingID=' + itemKey + '&r=' + Math.random();
                $("#EditDIV").load(url);
            });

        });
    </script>
</div>